<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background-color: #f00;
            /* animation: name duration timing-function delay iteration-count direction fill-mode; */
            /* 简写 调用动画*/
            animation: move 2s alternate;
        }
        /* 只要打开这个页面就让这个盒子从它初始的位置水平移动到1000个像素的位置 */
        /* 定义动画 */
        @keyframes move {
            0% {
                transform: translateX(0px);
            }
            100% {
                transform: translateX(1000px);
            }
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>